import { EntitySchema } from '@mikro-orm/core';

export class PasswordResets {
  id!: number;
  email!: string;
  token!: string;
  createdAt?: Date;
}

export const PasswordResetsSchema = new EntitySchema({
  class: PasswordResets,
  properties: {
    id: { primary: true, type: 'number' },
    email: { type: 'string', length: 255, index: 'password_resets_email_index' },
    token: { type: 'string', length: 255 },
    createdAt: { type: 'Date', length: 0, nullable: true },
  },
});
